﻿<UserControl
	x:Class="ExampleControl.Controls.SidePanelControl"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
	xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" 
	xmlns:DeepProtoControls="clr-namespace:ExampleControl.Controls" 
	xmlns:ProtoGeometryTools="clr-namespace:ExampleControl.Controls.GeometryTools" 
	xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
	RenderTransformOrigin="0.5,0.5"
	mc:Ignorable="d" d:DesignWidth="185" d:DesignHeight="280" 
	x:Name="SidePanelUserControl">

    <Grid x:Name="LayoutRoot" Width="250">

        <Grid.RenderTransform>
            <TransformGroup>
                <ScaleTransform/>
                <SkewTransform/>
                <RotateTransform/>
                <TranslateTransform X="260" />
            </TransformGroup>
        </Grid.RenderTransform>

        <vsm:VisualStateManager.VisualStateGroups>
            <vsm:VisualStateGroup x:Name="SidePanelVisualStates">
                <vsm:VisualStateGroup.Transitions>
                    <vsm:VisualTransition GeneratedDuration="00:00:00.8000000"/>
                </vsm:VisualStateGroup.Transitions>
                <vsm:VisualState x:Name="SidePanelOpen">
                    <Storyboard>
                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </vsm:VisualState>
                <vsm:VisualState x:Name="SidePanelClose">
                    <Storyboard>
                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="260"/>
                        </DoubleAnimationUsingKeyFrames>
                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.Opacity)">
                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                        </DoubleAnimationUsingKeyFrames>
                    </Storyboard>
                </vsm:VisualState>
            </vsm:VisualStateGroup>
        </vsm:VisualStateManager.VisualStateGroups>

        <Border x:Name="SidePanelBorder" VerticalAlignment="Stretch" Background="#A82D2D2D" CornerRadius="8,8,8,8" BorderBrush="#FF626262" BorderThickness="2,2,2,2" ScrollViewer.HorizontalScrollBarVisibility="Visible" RenderTransformOrigin="0.5,0.5">

            <Border.RenderTransform>
                <TransformGroup>
                    <ScaleTransform/>
                    <SkewTransform/>
                    <RotateTransform/>
                    <TranslateTransform/>
                </TransformGroup>
            </Border.RenderTransform>

            <StackPanel x:Name="SidePanel" Orientation="Vertical" Width="250" >

                <controls:Expander x:Name="_ExpDynamicTileLayers" HorizontalAlignment="Stretch" Margin="3,3,3,3" VerticalAlignment="Top" Expanded="_Expander_Expanded" Collapsed="_Expander_Collapsed">
                    <controls:Expander.Header>
                        <TextBlock Text="Set TileProvider Sources" Foreground="White"/>
                    </controls:Expander.Header>
                    <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto">
                        <StackPanel Orientation="Vertical">
                            <Button x:Name="SetVE" Content="Set Virtual Earth" Margin="3,3,3,3" Style="{StaticResource StandardButton}" Click="SetVE_Click"/>
                            <Button x:Name="SetCM" Content="Set Cloud Made" Margin="3,3,3,3" Style="{StaticResource StandardButton}" Click="SetCM_Click"/>
                            <Button x:Name="SetOSM" Content="Set Open Street Map" Margin="3,3,3,3" Style="{StaticResource StandardButton}" Click="SetOSM_Click"/>
                            <Button x:Name="SetYahoo" Content="Set Yahoo" Margin="3,3,3,3" Style="{StaticResource StandardButton}" Click="SetYahoo_Click"/>
                        </StackPanel>
                    </ScrollViewer>
                </controls:Expander>

                <controls:Expander x:Name="_ExpMapSources" Margin="3,3,3,3" VerticalAlignment="Top" IsExpanded="False" Expanded="_Expander_Expanded" Collapsed="_Expander_Collapsed">
                    <controls:Expander.Header>
                        <TextBlock Text="Map Source Selection" Foreground="White"/>
                    </controls:Expander.Header>
                    <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto">
                        <DeepProtoControls:MapSourceControl ApplicationID="Your BingMaps AppID Here" x:Name="mapSourceControl" />
                    </ScrollViewer>
                </controls:Expander>

                <controls:Expander x:Name="_ExpDevButtons" Margin="3,3,3,3" VerticalAlignment="Top" Expanded="_Expander_Expanded" Collapsed="_Expander_Collapsed">
                    <controls:Expander.Header>
                        <TextBlock Text="Developer Commands" Foreground="White"/>
                    </controls:Expander.Header>
                    <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto">
                        <DeepProtoControls:GeoServices x:Name="geoServices" ApplicationID="Your BingMaps AppID Here" Margin="0,9,0,9" Orientation="Vertical" />
                    </ScrollViewer>
                </controls:Expander>

                <controls:Expander x:Name="_ExpGeoCodingFind" HorizontalAlignment="Stretch" Margin="3,3,3,3" VerticalAlignment="Top" Expanded="_Expander_Expanded" Collapsed="_Expander_Collapsed">
                    <controls:Expander.Header>
                        <TextBlock Text="Coding Find Command" Foreground="White"/>
                    </controls:Expander.Header>
                    <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto">
                        <DeepProtoControls:GeoFind ApplicationID="Your BingMaps AppID Here" />
                    </ScrollViewer>
                </controls:Expander>

                <controls:Expander x:Name="_ExpGeoCodingRoute" HorizontalAlignment="Stretch" Margin="3,3,3,3" VerticalAlignment="Top" Expanded="_Expander_Expanded" Collapsed="_Expander_Collapsed">
                    <controls:Expander.Header>
                        <TextBlock Text="Coding Route Command" Foreground="White"/>
                    </controls:Expander.Header>
                    <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto">
                        <DeepProtoControls:GeoRoute ApplicationID="Your BingMaps AppID Here" />
                    </ScrollViewer>
                </controls:Expander>

                <controls:Expander x:Name="_GeometryTools" HorizontalAlignment="Stretch" Margin="3,3,3,3" VerticalAlignment="Top" Expanded="_Expander_Expanded" Collapsed="_Expander_Collapsed">
                    <controls:Expander.Header>
                        <TextBlock Text="Geometry Shape Settngs" Foreground="White"/>
                    </controls:Expander.Header>
                    <ScrollViewer HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Auto">
                        <ProtoGeometryTools:GeometrySettings />
                    </ScrollViewer>
                </controls:Expander>
                
                <controls:Expander x:Name="_ExpGeoRss" Margin="3,3,3,3" VerticalAlignment="Top" Expanded="_Expander_Expanded" Collapsed="_Expander_Collapsed">
                    <controls:Expander.Header>
                        <TextBlock Text="GeoRSS" Foreground="White"/>
                    </controls:Expander.Header>
                    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
                        <DeepProtoControls:GeoRss x:Name="geoRss" Margin="0,9,0,9" Orientation="Vertical" />
                    </ScrollViewer>
                </controls:Expander>

            </StackPanel>

        </Border>

    </Grid>
</UserControl>